export function ObjectToString(obj) {
    return obj.join(",");
}

export function formatterDateFull(date) {
    let datetime = new Date(date);
    let year = datetime.getFullYear();
    let month = datetime.getMonth() + 1;
    month = month >= 10 ? month : "0" + month;
    let day = datetime.getDate();
    day = day >= 10 ? day : "0" + day;
    let hour = datetime.getHours();
    hour = hour >= 10 ? hour : "0" + hour;
    let minute = datetime.getMinutes();
    minute = minute >= 10 ? minute : "0" + minute;
    let second = datetime.getSeconds();
    second = second >= 10 ? second : "0" + second;
    return `${year}-${month}-${day}  ${hour}:${minute}:${second}`;
}

export function formatterDate(date) {
    let datetime = new Date(date);
    let year = datetime.getFullYear();
    let month = datetime.getMonth() + 1;
    month = month >= 10 ? month : "0" + month;
    let day = datetime.getDate();
    day = day >= 10 ? day : "0" + day;
    return `${year}-${month}-${day}`;
}

export function getObjKeys(obj) {
    let str = "";
    obj.forEach(item => {
        str += item.id + ",";
    })
    str = str.substring(0, str.length - 1);
    return str;
}

export function formatterBool(boolValue) {
    return boolValue ? "是" : "否";
}